package com.hx0311.pas.dept.dao;

import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.ArrayList;
import java.util.List;

import com.hx0311.pas.dept.model.Jgdy;

@Deprecated
public class JgdyUtil {
	
	public static Jgdy toJgdy(ResultSet rs) throws SQLException{
		if (rs != null){
			Jgdy data = new Jgdy();
			data.setJgm(rs.getString("jgm"));
			data.setJgmc(rs.getString("jgmc"));
			data.setJglx(rs.getString("jglx"));
			return data;
		}
		return null;
	}
	
	public static List<Jgdy> toList(ResultSet rs) throws SQLException{
		List<Jgdy> datas = new ArrayList<Jgdy>();
		while(rs.next()){
			datas.add(toJgdy(rs));
		}
		return datas;
	}

}
